﻿@model Entity.AssignTask
@{
    ViewBag.Title = "Assign task";
}

@section breadcrumb
{
    <li>@Html.ActionLink("Task manager", "Index", "Task")</li>
    <li>@Html.ActionLink("Assign task", "Index", "AssignTask", new {id = ViewBag.Task.Id})</li>
}

<div class="box box-primary">
    <div class="box-header">
        <h3 class="box-title">Sub task - @ViewBag.Task.Name</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()
        <div class="box-body">
            <div class="form-group">
                @Html.HiddenFor(m => m.TaskId)
                @Html.HiddenFor(m => m.UserId)
                @*<div class="col-md-6">
                    
                    <label for="userId">Employee</label>
                    @Html.DropDownListFor(m => m.UserId,  new SelectList(ViewBag.Users, "Id", "FullName"),new { @class = "form-control" })
                </div>*@
                    @*@Html.LabelFor(m => m.StartAndEndDate)*@
                    <label for="requirement">Start Date And End Date</label>
                    <div class="input-group">
                        <div class="input-group-addon">
                            <i class="fa fa-calendar"></i>
                        </div>
                        @Html.TextBoxFor(m => m.StartAndEndDate, new { @class = "form-control pull-right" })
                    </div><!-- /.input group -->
            </div>
            <div class="form-group">
                <label for="requirement">Requirement</label>
                @Html.TextAreaFor(m => m.Requirement, new { @class = "form-control", rows = "5" })
            </div>
            @*@Html.ValidationSummary(true)*@
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
            <button type="submit" class="btn btn-primary">Save</button>
            <a href="@Url.Action("Index", new {id = ViewBag.Task.Id})" class="btn btn-primary">Cancel</a>
        </div>
    }
</div>
@section Script
{
    <script type="text/javascript">
        $(function () {
            //Datetime mask
            $('#StartAndEndDate').daterangepicker({ format: 'MM/DD/YYYY' });
        });
    </script>
}